package com.work.washer.config;

import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * @author  
 * @date 2024/2/18 1:03
 */
@RestControllerAdvice
public class ErrorAdvice {

    @ExceptionHandler({Exception.class})
    public Res ExceptionHandler(Exception e){
        e.printStackTrace();
        return  Res.error(e.getMessage());
    }
}
